package cn.seaboot.admin.logger.bean;


import io.swagger.v3.oas.annotations.media.Schema;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * POJO
 * 系统日志 [t_sys_log_access]
 * <p>
 *
 * @author Mr.css on  2019-03-25 11:40
 */
@Schema(description = "系统日志 [t_sys_log_access] 实体类")
public class AccessLog implements Serializable {
    private static final long serialVersionUID = -5183979735678947782L;
    /**
     * ID
     */
    @NotNull
    @Size(max = 32)
    @Schema(description = "ID")
    private String id;
    /**
     * 日志类型
     */
    @Schema(description = "日志类型")
    private Integer logType;
    /**
     * 日志等级
     */
    @Schema(description = "日志等级")
    private Integer logLevel;
    /**
     * 机构ID
     */
    @Size(max = 32)
    @Schema(description = "机构ID")
    private String orgId;
    /**
     * 分组ID
     */
    @Size(max = 32)
    @Schema(description = "分组ID")
    private String deptId;
    /**
     * 用户ID
     */
    @Size(max = 32)
    @Schema(description = "用户ID")
    private String userId;
    /**
     * 用户名
     */
    @Size(max = 64)
    @Schema(description = "用户名")
    private String userName;
    /**
     * 请求路径
     */
    @Size(max = 128)
    @Schema(description = "请求路径")
    private String servletPath;
    /**
     * 请求方式
     */
    @Size(max = 8)
    @Schema(description = "请求方式")
    private String requestMethod;
    /**
     * 请求体
     */
    @Size(max = 8)
    @Schema(description = "请求体")
    private String requestBody;
    /**
     * 请求体
     */
    @Size(max = 65535)
    @Schema(description = "请求参数")
    private String requestParameter;
    /**
     * 响应体
     */
    @Size(max = 65535)
    @Schema(description = "响应体")
    private String responseBody;
    /**
     * 接口功能描述
     */
    @Size(max = 64)
    @Schema(description = "接口功能描述")
    private String operation;
    /**
     * 创建日期
     */
    @Schema(description = "创建日期")
    private LocalDateTime gmtCreate;


    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Integer getLogType() {
        return logType;
    }

    public void setLogType(Integer logType) {
        this.logType = logType;
    }

    public Integer getLogLevel() {
        return logLevel;
    }

    public void setLogLevel(Integer logLevel) {
        this.logLevel = logLevel;
    }

    public String getOrgId() {
        return orgId;
    }

    public void setOrgId(String orgId) {
        this.orgId = orgId;
    }

    public String getDeptId() {
        return deptId;
    }

    public void setDeptId(String deptId) {
        this.deptId = deptId;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getServletPath() {
        return servletPath;
    }

    public void setServletPath(String servletPath) {
        this.servletPath = servletPath;
    }

    public String getRequestMethod() {
        return requestMethod;
    }

    public void setRequestMethod(String requestMethod) {
        this.requestMethod = requestMethod;
    }

    public String getRequestBody() {
        return requestBody;
    }

    public void setRequestBody(String requestBody) {
        this.requestBody = requestBody;
    }

    public String getRequestParameter() {
        return requestParameter;
    }

    public void setRequestParameter(String requestParameter) {
        this.requestParameter = requestParameter;
    }

    public String getResponseBody() {
        return responseBody;
    }

    public void setResponseBody(String responseBody) {
        this.responseBody = responseBody;
    }

    public String getOperation() {
        return operation;
    }

    public void setOperation(String operation) {
        this.operation = operation;
    }

    public LocalDateTime getGmtCreate() {
        return gmtCreate;
    }

    public void setGmtCreate(LocalDateTime gmtCreate) {
        this.gmtCreate = gmtCreate;
    }

    @Override
    public String toString() {
        return "AccessLog{" +
                "id='" + id + '\'' +
                ", logType=" + logType +
                ", logLevel=" + logLevel +
                ", orgId='" + orgId + '\'' +
                ", deptId='" + deptId + '\'' +
                ", userId='" + userId + '\'' +
                ", userName='" + userName + '\'' +
                ", servletPath='" + servletPath + '\'' +
                ", requestMethod='" + requestMethod + '\'' +
                ", requestBody='" + requestBody + '\'' +
                ", requestParameter='" + requestParameter + '\'' +
                ", responseBody='" + responseBody + '\'' +
                ", operation='" + operation + '\'' +
                ", gmtCreate=" + gmtCreate +
                '}';
    }
}
